package com.seu.nic.component.dao;


import com.seu.nic.component.mapper.BpmServerCurrentStateMapper;
import com.seu.nic.component.unit.BpmCurrentStatePO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 * 教职工基本信息 服务类
 * </p>
 *
 * @author wyd
 * @since 2024-04-22
 */
@Component
public class BpmServerCurrentStateDao {

    @Autowired
    private BpmServerCurrentStateMapper bpmCurrentStateMapper;

    public void insertBpmOperaCurrentPO(BpmCurrentStatePO bpmCurrentStatePO){
         bpmCurrentStateMapper.insert(bpmCurrentStatePO);
    }


    public List<BpmCurrentStatePO> selectAllBpmCurrentStatePO() {
        return bpmCurrentStateMapper.selectAllBpmCurrentStatePO();
    }

    public BpmCurrentStatePO selectBpmCurrentStatePOByWid(int wid) {
        return bpmCurrentStateMapper.selectBpmCurrentStatePOByWid(wid);
    }

    public BpmCurrentStatePO selectBpmCurrentStatePOByProcessInstanceId(
            String processInstanceId
    ) {
        BpmCurrentStatePO BpmCurrentStatePOS =
                bpmCurrentStateMapper.selectBpmCurrentStatePOByProcessInstanceId(processInstanceId);
        return BpmCurrentStatePOS;
    }

    public void updateBpmCurrentStatePOByProcessInstanceId(
            BpmCurrentStatePO bpmOperaHistoryPO
    ){
        bpmCurrentStateMapper.updateBpmCurrentStatePOByProcessInstanceId(
                bpmOperaHistoryPO
        );
    }

    public void deleteBpmCurrentStatePOByProcessInstanceId(
            String processInstanceId
    ) {

       bpmCurrentStateMapper.deleteBpmCurrentStatePOByProcessInstanceId(processInstanceId);
    }


}